package car;

/**
 * 汽车测试类
 */
public class CarTest {

    public static void main(String[] args){
        //创建三辆车
//        Car car1 = new Car();
//        Car car2 = new Car();
//        Car car3 = new Car();
//        //设置汽车属性
//        car1.brand = "小米";
//        car1.price =  300000;
//        car1.color = "黄色";
//        car2.brand = "兰博基尼";
//        car2.price =  7000000;
//        car2.color = "屎黄色";
//        car3.brand = "五菱宏光";
//        car3.price =  50000;
//        car3.color = "白色";
        //创建对象，调用带参数的构造方法，给属性赋值
        Car car1 = new Car("小米",300000,"黄色");
        Car car2 = new Car("兰博基尼",7000000,"屎黄色");
        Car car3 = new Car("五菱宏光",50000,"白色");
        //调用汽车的方法
        car1.drive();
        car1.turn();
        car1.stop();
        car2.drive();
        car2.turn();
        car2.stop();
        car3.drive();
        car3.turn();
        car3.stop();



    }
}
